package com.core;

import com.bone.WebServer;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class WebServerV1 extends WebServer {

    @Override
    public void start(){
        try {
            while (true) {
                ServerSocket server = this.getServer();
                Socket socket = server.accept();
                serverThread serverThread = new serverThread(socket);
                Thread t = new Thread(serverThread);
                t.start();
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
